package com.jeecg.demo.service.impl;

import java.io.Serializable;

import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeecg.demo.entity.TenantidUserEntity;
import com.jeecg.demo.service.TenantidUserServiceI;

@Service("tenantidUserService")
@Transactional
public abstract class TenantidUserServiceImpl extends CommonServiceImpl
        implements TenantidUserServiceI {

    @Autowired
    private NamedParameterJdbcTemplate namedParameterJdbcTemplate;

    public void delete(TenantidUserEntity entity) throws Exception {
        super.delete(entity);
    }

    public Serializable save(TenantidUserEntity entity) throws Exception {
        Serializable t = super.save(entity);
        return t;
    }

    public void saveOrUpdate(TenantidUserEntity entity) throws Exception {
        super.saveOrUpdate(entity);
    }

    public String getWorkTypeId(String orgid) {
        // TODO Auto-generated method stub
        TenantidUserEntity tenantidUserEntity = super.findUniqueByProperty(
                TenantidUserEntity.class, "orgid", orgid);
        String workTypeId = tenantidUserEntity.getWorktypeid().toString();
        return workTypeId;
    }
}